#!/usr/bin/env python
import   cv2 as cv
import numpy as np
import sys

print 'Opencv version is:',cv.__version__,len(sys.argv)

Capture = cv.VideoCapture(0)

while(True):
	if not Capture.isOpened():
		print 'Camera open error'
		break

	ret,frame = Capture.read()
	if not ret:
		print 'Camera read frame error'
		break

	cv.imshow('Video',frame)
	
	if(cv.waitKey(1) == ord('q')):
		break

Capture.release()
		
